class Websitesinf < ActiveRecord::Base
validates_uniqueness_of :name
#  validates_uri_existence_of :url1, :with =>
#        /(^$)|(^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$)/ix,:message    => 'OpenID URL must be valid'  
has_many :tasksdescs,:dependent => :destroy
 has_many :tags
 has_many :categoryts
 has_many :categories
 has_many :articles
 
   def has_article?(websitename)
    self.articles.find_by_title(websitename) ? true : false
  end  
end
